home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ShareWare OnLine 2
/
ShareWare OnLine Volume 2 (CMS Software)(1993).iso
/
util2
/
v12n06.zip
/
BOMEOM.SC
next >
Wrap
Text File
|
1992-08-14
|
603b
|
27 lines
;Bom(dDay) - Returns the first of the month
PROC Bom(dDay)
IF dDay = BLANKDATE() THEN
dDay = TODAY()
ENDIF
RETURN dDay - DAY(dDay) +1
ENDPROC
;Eom(dDay) - Returns the last of the month
PROC Eom(dDay)
PRIVATE dBump
IF dDay = BLANKDATE() THEN
dDay = TODAY()
ENDIF
dBump = dDay + 35 - Day(dDay)
RETURN dBump - Day(dBump)
ENDPROC
;The following script demonstrates the above procedures
CLEAR
MESSAGE "The first of this month is " + STRVAL(Bom(TODAY()))
SLEEP 2000
CLEAR
SLEEP 500
MESSAGE "The last of this month is " + STRVAL(Eom(BLANKDATE()))
SLEEP 2000